<?php include 'partials/header.php'; ?>
<div class="jumbotron">
    <h1>CS:GO  Strat&eacute;gies</h1>
    <p>Cr&eacute;er une strat&eacute;gie</p>
</div>
<div class="container">                
    <div class="col-lg-4 ">
        <input name="strategyName" id="strategyName" type="text"  placeholder="Nom de la strategie" class="form-control" />
    </div>
    <div class="col-lg-8"></div>
</div>
<div class="alert alert-info alert-dismissable voffset2">
    N'oubliez pas de s&eacute;lectionner votre mappe ci-dessous
    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
</div>
<div class="container voffset2">
    <div class="col-lg-3">
        <div class="thumbnail" id="mirage">
            <div class="caption">
                <h4>Defuse : Mirage</h4>
            </div>
            <img src="media/de_mirage_small.png" class="img-polaroid" alt="Defuse : Mirage" width="150" height="150" />        
        </div>
        <div class="thumbnail" id="season">
            <div class="caption">
                <h4>Defuse : Season</h4>
            </div>                
            <img src="media/de_season_small.png" class="img-polaroid" alt="Defuse : Season" />                                
        </div>
    </div>
    <div class="col-lg-3">
        <div class="thumbnail" id="inferno">
            <div class="caption">
                <h4>Defuse : Inferno</h4>
            </div>
            <img src="media/de_inferno_small.png" class="img-polaroid" alt="Defuse : Inferno" />                
        </div>           

    </div>
</div>

<div style="text-align:right">
    <button type="submit" class="btn btn-success" onclick="create()">Cr&eacuteer</button>
</div>

<script>
    var chosenMap = "";
    var id = "";
    // Fonction pour la selection de la map
    $('.thumbnail').bind('click', function() {
        id = $(this).attr('id');
        // Reset all other backgrounds to white            
        $('.thumbnail').each(function() {
            // Selector for the current div in the loop
            if ($(this).attr('id') !== id || $(this).css('background-color') === 'rgb(192, 192, 192)') {
                // Reset to white if selected too
                $(this).css('background-color', 'rgb(255, 255, 255)');
            } else {
                $(this).css('background-color', 'rgb(192, 192, 192)');
                chosenMap = $(this).attr('id');
            }
        });
    });
</script>
<?php include 'partials/footer.php'; ?>